The invention generally relates to an improved method for removing perspective distortion from digital images in optical scanning applications, such as bar code scanning or optical character recognition (hereinafter “OCR”) systems.
CCD cameras and other imaging equipment are commonly used in industry as part of identification systems which image and interpret bar code or character information on products and packages as well as product dimensioning systems.
Referring to the drawings, wherein like numerals designate like elements throughout, FIG. 1 illustrates one such application. An optical scanning apparatus 1 which comprises a line scanner 10 (i.e., an electronic imaging device that scans images of 1×N pixels) which is configured to image a box 12 as it proceeds along a conveyor belt 14 having a top surface 24 in a leftward direction of travel 16. As the box 12 moves along the conveyor belt 14, the imager 10 takes a series of images along a linear scan line 18 which are electronically compiled into a resultant image 26 (shown in FIG. 2).
By way of further illustration, FIG. 2 shows an example of a resultant image 26 of the box 12 taken with the line scanner 10. As is evident from FIG. 2 the upper front edge 22 of the box 12 appears larger than the lower front edge 20. As can be seen in FIG. 2, the resultant image 26 is distorted in the sense that the portions of the box 12 which are further away from the line scanner 10 appear smaller than the portions of the box 12 which are closer to the sensor 10. This effect is illustrated by the different widths of the lower front edge 20 and upper front edge 22 of the box 12. The width of the upper and lower edges 20 and 22 are, in fact, equal.
Perspective distortion presents a problem in bar code, OCR, and other identification applications because such distortion can have a detrimental effect on the ability to accurately read the bar codes and/or characters which are to be identified.
Referring again to FIG. 1, previous attempts to rescale images captured by the imager 10 to eliminate perspective distortion have involved the use of a zoom lens in combination with dimensioning device (not shown), which dynamically measures the distance D1 between the imager 10 and the point 30 on the box 12, which is intersected by the scan line 18 of the imager 10. The zoom lens is adjusted before each scan line is taken, which compensates for perspective distortion as the box 12 moves along conveyor belt 14. The zoom lens rescaling method is not ideal because it requires constant movement of a mechanical component, the zoom lens, which limits the scan rate of the camera and potentially reduces the reliability and useful life of the camera.